/*
 * @version: vue3
 * @Author: lxs
 * @Date: 2022-04-27 11:05:35
 * @LastEditors: sueRimn
 * @LastEditTime: 2022-04-27 14:20:21
 */
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";
// import legacyPlugin from "@vitejs/plugin-legacy"

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  server: {
    host: "0.0.0.0", // 解决‘vite use '--host to expose’
    port: 8080,
    open: true,
  },
//   plugins:[
//     legacyPlugin({
//         targets:["edge>=67","chrome>=67","not IE 11"],
//         modernPolyfills:true,
//         polyfills:true,
//     })
//   ],
  resolve: {
    alias: [
      {
        find: "@",
        replacement: resolve(__dirname, "src"),
      },
    ],
  },
});
